import Vue from 'vue';
import VueRouter from 'vue-router';
import Home from '@/pages/home';
import Tester from '@/pages/tester';
import History from '@/pages/history';
import Document from '@/pages/document';
import SearchStation from '@/pages/searchStation';
import SearchDevice from '@/pages/searchDevice';

/*  使用vue路由方法 */
Vue.use(VueRouter);

/*  创建路由对象 */
const router = new VueRouter({
  /*  配置路由 */
  routes: [
    // 首页
    {
      name: 'Home',
      path: '/home',
      component: Home,
      meta: {
        title: '选择试验仪器',
      }
    },
    {
      name: 'Tester',
      path: '/tester',
      component: Tester,
    },
    {
      name: 'SearchStation',
      path: '/search-station',
      component: SearchStation ,
      meta: {
        title: '检测设备选择'
      }
    },
    {
      name: 'SearchDevice',
      path: '/search-device',
      component: SearchDevice,
      meta: {
        title: '检测设备选择'
      }
    }
  ]
});

export default router;
